﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SmartWMS.Common.ResponseOutput;
using SmartWMS.Server.StatementServer.InventoryBookServer;
using SmartWMS.Server.StatementServer.InventoryBookServer.Dto;

namespace SmartWMS.API.Controllers.StatementMange
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [ApiExplorerSettings(GroupName = "Statement")]
    public class InventoryBooksController : ControllerBase
    {
        private readonly IInventoryBookServers _inventoryBookServers;

        public InventoryBooksController(IInventoryBookServers inventoryBookServers)
        {
            _inventoryBookServers = inventoryBookServers;
        }

        /// <summary>
        /// 库存台账列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Response<List<InventoryBookDtoPes>>> GetInventoryBookDtoPes(InventoryBookDtoPage dto) { 
            var list = await _inventoryBookServers.GetInventoryBookDtoPes(dto);
            return list;
        }
    }
}
